package c.c.k.repository;

import c.c.k.pojo.FundStock;
import c.c.k.pojo.Stock;
import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by chenck on 2022/3/19.
 */
@Repository
public interface FundStockRepository extends JpaRepository<FundStock, Long> {
    FundStock findByStockIdAndFundId(Long stockId, Long fundId);
    List<FundStock> findByFundId(Long fundId, Sort sort);
    List<FundStock> findByStockIdAndPercentGreaterThan(Long stockId, Double gtPercent);
    List<FundStock> findByPercentGreaterThan(Double gtPercent);
}
